<?
include("../../../include/autonum.php");
require("../../../include/class/aut.class.inc.php");
require("../../../include/global.inc.php");
require("../../../include/param.inc.php");
$objeto = extrac_sesion();?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>ADIACT</title>
<script type="text/javascript" src="../../../include/js/jquery-1.3.2.js"></script>
<script type="text/javascript" src="../../../include/js/adiact_biblio.js"></script>
<script type="text/javascript" src="../../../include/js/ajaxupload.js"></script>
<script type="text/javascript" src="../../../include/js/jquery.fancybox.js?v=2.0.6"></script>
<link rel="stylesheet" type="text/css" href="../../../include/css/jquery.fancybox.css?v=2.0.6" media="screen" />
<link href="../../../include/css/modulos.css" rel="stylesheet" type="text/css">
<link href="../../../include/css/panel.css" rel="stylesheet" type="text/css">
<script type= "text/javascript">/*<![CDATA[*/
$(document).ready(function(){

	new AjaxUpload('#cjImagen', {
		action: "../../../include/php/agregar_imagen_gi.inc.php", 
		name: 'cjImagen',
		onSubmit : function(file, ext){
		  	if (! (ext && /^(jpg|png|jpeg|gif)$/i.test(ext))){
              // extension is not allowed
              alert('Error: tipo de archivo invalido');
              return false;
		  	}else{
		  		$("#status").show();
		  		$("#status").html("<img src=../../../images/loader.gif> Procesando solicitud...");
		  		this.setData({'album': '<?=$_GET["album"]?>'});
		  	}
		},
		onComplete: function(file, response){
			var respon = response.split("/");
			if(respon[0] == "1"){
				window.location.href = "../../modulos/gimages/verimagenes.php?album="+respon[1];
			}			
		}
	});
});/*]]>*/
</script>
</head>
<body bgcolor="#cccccc">
<center>
  <table width="800" border="0" cellpadding="0" cellspacing="0">
       <tr>
      <td colspan="2">
  		<div class="texto_bienvenida cizq">
		Bienvenido, <?=$objeto->obtenerUsuario();?><br/>
    </div>
    <div class="texto_encabezado cder">
     	<div class="tab cizq">
	    <a href="../../index.php">Panel Principal</a>
	    </div>
	    <div class="tab cizq">
	    <a href="index.php">Panel Album</a>
		</div>
	    <div class="tab cizq">
	    <a href="../../../include/<?=$objeto->cerrar_s()?>" class="menu">Cerrar Sesi&oacute;n</a>    
	    </div>
    </div>
    <div class="sep"></div>
  </td>
        </tr>
        <tr>
          <td colspan="2" align="center" valign="baseline" bgcolor="#FFFFFF" class="Estilo78" scope="col"><br/>
          <div align="center" style="margin:6px 0 6px 0;">	
          <form method="POST" action="">	
          <table cellspacing="5" cellpadding="5" width="400">
          <tr>
          <td colspan="2" class="celda_form" style="background-color:#333333">	
          <div class="cizq">Agregar Imagen</div>
          </td>
          </tr>
          <tr>
          <td valign="top" style="background-color:#9CBADE" class="celda_form">Imagen</td>
          <td align="left" style="background-color:#9CBADE">
          <input type="file" name="cjImagen" id="cjImagen" size="60" />    </td>
          </tr>
          <tr>
          <td colspan="2" class="linea">&nbsp;</td>
          </tr>
          </table>
          </form>     
          </div>   
          <div>
          <div id="status" class="centro hide status_b"></div>
          </div>  
          </td>
        </tr>
        <tr>
          <td colspan="2" align="center" valign="baseline" class="celda_pie"scope="col">&nbsp;</td>
        </tr>
</table>
</center>
</body>
</html>
